Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/milestone trustful zuzalu d app interface #18

Open
wants to merge 140 commits into
base: main
Choose a base branch
from

Conversation

heronlancellot
Copy link
Member

No description provided.

toast.error(
`Unsupported network. Please switch to the ${isDev ? 'Scroll Sepolia' : 'Scroll'} network.`,
);
switchChain({ chainId: isDev ? scrollSepolia.id : scroll.id });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this needs to use switchChainAsync in order to make sure the user switches chain when necessary?

from: address,
role: role,
account: validAddress.address as `0x${string}`,
msgValue: BigInt(0),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heronlancellot

  1. I cannot see your feedbacks if you resolve the conversations
  2. Is this value always the same? As per my research it is always 0, being possible to set this as a function internal function

from: address,
role: role,
account: validAddress.address as `0x${string}`,
msgValue: BigInt(0),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from: address,
uid: schemaUID as `0x${string}`,
action: action,
msgValue: BigInt(0),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from: address,
sessionTitle: inputValuesTextArea['removeSessionTitle'],
sessionOwner: validAddress.address as Address,
msgValue: BigInt(0),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +48 to +50
{
action: ADMIN_ACTION.JOIN_SESSION,
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heronlancellot I can not see your feedback properly if you resolve the conversation

Comment on lines +48 to +50
{
action: ADMIN_ACTION.JOIN_SESSION,
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See how you are defining the arrays as [{ action: something }, { action: something_else }] when these could be defined as [something, something_else]


const [isCopied, setIsCopied] = useState<boolean>(false);
const [isVisible, setIsVisible] = useState(false);
// const prefixToGiveBadge = 'https://trustful.ing/give-badge';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add comments on the commented sections, sharing why these are commented and if these are open action items?

setEventDetails(eventsData);
}
} catch (error) {
console.log('error', error);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('error', error);
console.error('error', error);

…ce' into feat/milestone-trustful-zuzalu-dApp-interface
…zalu-dApp-interface

Feat/milestone trustful zuzalu d app interface
const iconColor =
(inputAddress && isAddress(inputAddress)) ||
(badgeInputAddress && isAddress(badgeInputAddress?.address))
? 'text-[#000000 ]'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
? 'text-[#000000 ]'
? 'text-[#000000]'

} else if (inputBadge.uid === TRUSTFUL_SCHEMAS.ATTEST_EVENT.uid) {
encodeParam = TRUSTFUL_SCHEMAS.ATTEST_EVENT.data;
encodeArgs = [inputBadge.title, commentBadge ?? ''];
console.log('badgeInputAddress', badgeInputAddress);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('badgeInputAddress', badgeInputAddress);

ROLES.VILLAGER,
badgeInputAddress.address,
);
console.log('isVillager', isVillager);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('isVillager', isVillager);

parseAbiParameters(encodeParam),
encodeArgs,
);
console.log('data', data);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('data', data);

toast.error(
'Address already checked-out: Address already have this badge.',
);
console.log('!isVillager2', !isVillager);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('!isVillager2', !isVillager);

if (!inputBadge) {
setLoading(false);
toast.error('Invalid Badge: Please select a badge to give.');
console.log('!inputBadge', !inputBadge);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('!inputBadge', !inputBadge);

if (!badgeInputAddress) {
setLoading(false);
toast.error('Invalid Ethereum Address: Please provide a valid address.');
console.log('!badgeInputAddress', !badgeInputAddress);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('!badgeInputAddress', !badgeInputAddress);

if (!address) {
setLoading(false);
toast.error('No account connected: Please connect your wallet.');
console.log('!address', !address);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('!address', !address);

data: data,
value: BigInt(0),
};
console.log('attestationRequestData', attestationRequestData);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('attestationRequestData', attestationRequestData);

inputBadge.uid,
attestationRequestData,
);
console.log('response', response);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('response', response);

export const TheFooterNavbar = () => {
const params = useParams();
const { push } = useRouter();
// const { villagerAttestationCount } = useContext(WalletContext);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// const { villagerAttestationCount } = useContext(WalletContext);

}
}, []);

const villagerAttestationCount = Number(1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this logic needs to be dynamic, right?

</Text>
</Box>
)}
{/* <Box

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment on why this is commented out

as={IconButton}
aria-label="Options"
icon={
<Flex className="p-[6px] gap-2 items-center">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Flex className="p-[6px] gap-2 items-center">
<Flex className="p-1.5 gap-2 items-center">

Comment on lines +34 to +36
{/* {isOpenMenu && (
<DropdownProfile isOpenMenu={isOpenMenu} onClose={closeMenu} />
)} */}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment on why this is out, please! And in every commented out section, please :)

Suggested change
{/* {isOpenMenu && (
<DropdownProfile isOpenMenu={isOpenMenu} onClose={closeMenu} />
)} */}
{/* {isOpenMenu && (
<DropdownProfile isOpenMenu={isOpenMenu} onClose={closeMenu} />
)} */}


// host_ + titleSession(Name-Session) + _ + Timestamp

// nas sessoes que eu sou owner adicionar badge de host e atendee

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// nas sessoes que eu sou owner adicionar badge de host e atendee
// TODO: nas sessoes que eu sou owner adicionar badge de host e atendee

userAddress: address as Address,
});

console.log('eventsxxxx', events);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('eventsxxxx', events);


if (spaceIds) {
for (const spaceId of spaceIds) {
console.log('spaceId', spaceId);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('spaceId', spaceId);

eventid: event.eventId,
userAddress: address as Address,
});
console.log('sessionssessionssessionssessions', sessions);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('sessionssessionssessionssessions', sessions);

}
}
} catch (error) {
console.log('error', error);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('error', error);
console.error('error', error);

heronlancellot pushed a commit to heronlancellot/ZuzaluCityOS that referenced this pull request Nov 15, 2024
…zalu-dApp-interface

feat: merge-main-into-zuzalu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants